package com.huanong.service.impl;
/*
 *@Author:anran
 *@Date:2020/12/9
 *@Version 1.0
 */

import com.huanong.mapper.IntroductionMapper;
import com.huanong.pojo.ConTact;
import com.huanong.service.ContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContactServiceImpl implements ContactService {

    @Autowired
    private IntroductionMapper introductionMapper;

    @Override
    public List<ConTact> query() {
        return introductionMapper.queryContact();
    }

    @Override
    public ConTact queryById(Integer CtId) {
        return introductionMapper.queryContactById(CtId);
    }

    @Override
    public int add(ConTact conTact) {
        return introductionMapper.addContact(conTact);
    }

    @Override
    public int delete(Integer CtId) {
        return introductionMapper.deleteContact(CtId);
    }

    @Override
    public int update( ConTact conTact) {
        return introductionMapper.updateContact(conTact);
    }
}
